package com.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pojo.RisingPrices;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface ConvenienceDao_Rising_Prices extends BaseMapper<RisingPrices> {

    /*增加*/
    @Update("update rising_prices set water=water+#{water} where id=#{id};")
    public void waterAddChargeMoney(RisingPrices risingPrices);

    @Update("update rising_prices set electric=electric+#{electric} where id=#{id};")
    public void electricAddChargeMoney(RisingPrices risingPrices);

    @Update("update rising_prices set gas=gas+#{gas} where id=#{id};")
    public void gasAddChargeMoney(RisingPrices risingPrices);


    /*减少*/
    @Update("update rising_prices set water=water-#{water} where id=#{id};")
    public void waterDescendChargeMoney(RisingPrices risingPrices);

    @Update("update rising_prices set electric=electric-#{electric} where id=#{id};")
    public void electricDescendChargeMoney(RisingPrices risingPrices);

    @Update("update rising_prices set gas=gas-#{gas} where id=#{id};")
    public void gasDescendChargeMoney(RisingPrices risingPrices);


}
